import type { RouterOptions } from "vue-router";
import LoginPage from "@/pages/Login.vue";
const HomePage = () => import("@/pages/home/index.vue");
const LayoutComponent = () => import("@/components/common/Layout.vue");
const schedulePage = () => import("@/pages/schedule/index.vue")

// 资产管理
const ParkManagementPage = () => import("@/pages/property/park-management/index.vue")
const IDCThingPage = () => import("@/pages/property/idc-thing/index.vue")
const StorePage = () => import("@/pages/property/store/index.vue")
const NotFound = () => import("@/pages/404.vue")

const routes: RouterOptions["routes"] = [
  {
    path: "/",
    component: LayoutComponent,
    children: [
      {
        name: "HomePage",
        path: "/home",
        component: HomePage,
      },
      {
        name: "schedule",
        path: "/schedule",
        component: schedulePage,
      },
      {
        name: "park-management",
        path: "/park-management",
        component: ParkManagementPage
      }, {
        name: "idc-thing",
        path: "/idc-thing",
        component: IDCThingPage
      }, {
        name: "store",
        path: "/store",
        component: StorePage
      }, { 
        path: '/:pathMatch(.*)*', 
        name: 'NotFound', 
        component: NotFound
      },
    ],
  },
  {
    name: "LoginPage",
    path: "/login",
    component: LoginPage,
  },
];
export default routes;
